using System;
using System.Collections.Generic;
using System.Text;

namespace uchomeDesktop
{
    class miniBlog : uchomeAPI
    {
        /// <summary>
        /// 
        /// </summary>
        public miniBlog() : base()
        {

        }

        /// <summary>
        /// get miniBlog
        /// </summary>
        /// <param name="num"></param>
        /// <returns></returns>
        public miniBlogInfo getOne()
        {
            miniBlogInfo[] ret = proxy.miniBlog_get(auth, 1);
            return ret[0];
        }

        /// <summary>
        /// list multi-miniBlogs
        /// </summary>
        /// <param name="num"></param>
        /// <returns></returns>
        public miniBlogInfo[] list(int num)
        {
            miniBlogInfo[] ret = proxy.miniBlog_get(auth, num);
            return ret;
        }

        public Boolean post(string message)
        {
            string clientIdentify = Properties.Settings.Default.programeName + " " + Properties.Settings.Default.programeVar;
            int id = proxy.miniBlog_post(auth, message, clientIdentify, "127.0.0.1");
            return id > 0;
        }
    }
}
